package engine.colliders;

import engine.entities.Entity;
import engine.entities.Spatial;

public class Bounce extends AABBCollisionResolver {

	@Override
	public boolean precondMet(Entity a, Entity b) {
		if (super.precondMet(a, b) && a != b)
			return true;
		else
			return false;
	}

	@Override
	public void updateCollision(Entity a, Entity b) {
		Spatial spatial = a.getSpatial();
		float speedX = spatial.getSpeedX();
		float speedY = spatial.getSpeedY();
		spatial.setSpeed(-1 * speedX, -1.5f * speedY);
	}

}
